package com.moyobar.app.provider;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.dubbo.config.annotation.Service;
import com.moyobar.app.api.UserService;
import com.moyobar.app.domain.User;

/**
 * Created by Rocky on 15/12/2.
 */
@Service
public class UserComponents implements UserService {

    @Override
    public User get(String id) {
        User user = new User();
        user.setId(id);
        user.setName("Rocky");
        return user;
    }

    @Override
    public List<User> list() {
        List<User> users = new ArrayList<>();
        User user = new User();
        user.setId("1");
        user.setName("Rocky");
        users.add(user);
        return users;
    }
}
